/*
 * @Date: 2023-02-28 19:16:22
 * @LastEditors: Zireael 1193875164@qq.com
 * @LastEditTime: 2023-02-28 19:47:59
 * @FilePath: \A19\frontend\src\hooks\world\createVideohook.ts
 */
export function createVidoehook() {
    const createElement = <T extends Element>(html: string) => {
        const el = document.createElement("div");
        el.innerHTML = html;
        return el.children[0] as T;
    };

    const el = 
    createElement<HTMLVideoElement>(
        `
        <video
            style="display: none" 
            autoplay
            muted 
            controls
        >
        </video>
        `
        //src="/sayori.mp4"
        //<source src="./video/sayori.mp4" type="video/mp4" />
        //poster="./video/poster.jpg"
    );
    document.body.appendChild(el);

    return{
        el
    }
}